win32: Set surface type early enough
authorMatthias Clasen <mclasen@redhat.com>
Wed, 22 May 2019 22:40:27 +0000 (22:40 +0000)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 28 May 2019 20:25:17 +0000 (20:25 +0000)
We need to set the surface type before
the frame clock.

gdk/win32/gdksurface-win32.c

index c0eeddfeee49b03abd4188f4e84f085f682f6aae..e8df18b5662478268d0712caf10c3f903f9d3780 100644 (file)
@@ -509,13 +509,13 @@ _gdk_win32_display_create_surface (GdkDisplay     *display,
     frame_clock = _gdk_frame_clock_idle_new ();
 
   impl = g_object_new (GDK_TYPE_WIN32_SURFACE,
+                       "surface-type", surface_type,
                        "display", display,
                        "parent", parent,
                        "frame-clock", frame_clock,
                        NULL);
 
   surface = GDK_SURFACE (impl);
-  surface->surface_type = surface_type;
   surface->x = x;
   surface->y = y;
   surface->width = width;